package cn.wolfcode.springcloud.feign;

import cn.wolfcode.springcloud.domain.Product;
import cn.wolfcode.springcloud.feign.hystrix.ProductFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name="PRODUCT-SERVER",fallback =ProductFeignHystrix.class)
public interface ProductFeignApi {

    @GetMapping("/products/get/{id}")
    Product get(@PathVariable("id") Long id);
}
